<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html" />

<body class="fixed hold-transition skin-blue">
	<div class="wrapper">

		<!-- Main Header -->
		<div th:replace="tophtml::html"></div>
		<!-- Left side column. contains the logo and sidebar -->
		<div th:replace="left::html"></div>

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<section class="content-header">
				<h1>
					增加会议<small>(<span style="color: red">*</span> 为必填项目)
					</small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="/conference/conferenceList">会议管理</a></li>
					<li><a href="#">添加会议</a></li>
				</ol>
			</section>

			<!-- Main content -->
			<section class="content container-fluid">
				<form th:action="@{/conference/saveConference}" method="post"
					th:object="${conference}" enctype="multipart/form-data" id="form1">
					<!-- Content Header (Page header) -->
					<div class="form-group">
						<label for="conferenceName">活动名称</label> <span style="color: red">*</span> <input
							type="text" class="form-control required" name="conferenceName"
							placeholder="Enter ..." th:value="${conference.conferenceName}">
						<p style="color: red;"
							th:if="${#fields.hasErrors('conferenceName')}"
							th:errors="*{conferenceName}">Error</p>
					</div>

					<div class="form-group">
						<label for="conferenceWebSite">会议主页</label> <input type="text" class="form-control url"
							name="conferenceWebSite"
							th:value="${conference.conferenceWebSite}" placeholder="http://" >
					</div>

					<div class="form-group">
						<label>活动总结</label>
						<textarea class="form-control"
							th:utext="${conference.conferenceSummary}"
							name="conferenceSummary" rows="3" placeholder="Enter ..."></textarea>
					</div>

					<div class="form-group">
						<p style="color: red;"
							th:if="${#fields.hasErrors('researchField')}"
							th:errors="*{researchField}">Error</p>
						<label for="researchField">所属领域</label> <span style="color: red">*</span>
						<div class="checkbox"
							th:each="rfd : ${researchFieldDictiontryList}">
							<label> <input type="checkbox" name="researchField"
								th:value="${rfd.names}" th:text="${rfd.worth}"
								th:checked="${#arrays.contains(researchFieldArr, rfd.names)}" required>
							</label>
						</div>
					</div>

					<div class="form-group">
						<label for="conferenceDateTime">会议开始时间:</label> <span style="color: red">*</span>
						<p style="color: red;"
							th:if="${#fields.hasErrors('conferenceDateTime')}"
							th:errors="*{conferenceDateTime}">Error</p>
						<div class="input-group date">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>

							<input type="text" class="form-control pull-right required date"
								id="datepicker" name="conferenceDateTime"
								th:value="${conference.conferenceDateTime}">

						</div>
					</div>

					<div class="form-group">
						<label for="conferenceBeginTime">会议结束时间:</label> <span style="color: red">*</span>
						<p style="color: red;"
							th:if="${#fields.hasErrors('conferenceBeginTime')}"
							th:errors="*{conferenceBeginTime}">Error</p>
						<div class="input-group date">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>

							<input type="text" class="form-control pull-right required"
								id="datepicker2" name="conferenceBeginTime"
								th:value="${conference.conferenceBeginTime}">

						</div>
					</div>

					<div class="form-group">
					<p style="color: red;"
							th:if="${#fields.hasErrors('area')}"
							th:errors="*{area}">Error</p>
                        <label for="domesticOrForeign">国内国外</label>
                        <span style="color: red">*</span>
                        <p style="color: red;" th:text="${domesticOrForeign}"></p>
                        <div class="radio">
                            <label>
                                <input type="radio" name="domesticOrForeign" id="optionsRadios1" value="0"  checked> 国内
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" name="domesticOrForeign" id="optionsRadios2" value="1" > 国外
                            </label>
                        </div>
                    </div>


					<div class="form-group form-area">
						<label >省</label> <span style="color: red">*</span>
						<p style="color: red;" th:text="${area}"></p>
						<select class="form-control form-area required" id="provinceId">
							<option value="-1"></option>
							<option th:each="list:${provinceDictiontryList}"
								th:value="${list.names}" th:text="${list.worth}"
								th:selected="${list.names eq province}"></option>
						</select>
					</div>
					<div class="form-group form-area">
						<label>市</label> <select class="form-control form-area"
							id="cityId">
							<option value="-1"></option>
							<option th:each="list:${cityDictiontryList}"
								th:value="${list.names}" th:text="${list.worth}"
								th:selected="${list.names eq cityId}"></option>
						</select>
					</div>
					<div class="form-group form-area">
						<label>区</label> <select class="form-control form-area"
							id="areaId">
							<option value="-1"></option>
							<option th:each="list:${areaDictiontryList}"
								th:value="${list.names}" th:text="${list.worth}"
								th:selected="${list.names eq areaId}"></option>
						</select>
					</div>

					<div class="form-group form-country">
						<label>国家</label> <span style="color: red">*</span>
						<p style="color: red;" th:text="${area}"></p>
						<select class="form-control form-area">
							<option value="-1"></option>
							 <option  th:each="list:${countryDictiontryList}" th:selected="${list.pid eq countryId}" th:value="${list.pid}" th:text="${list.worth}"></option>
						</select>
					</div>

					<div class="form-group">
						<label for="exampleInputFile">活动总结附件</label> <input type="file"
							name="conferenceFiles" id="conferenceFile">
					</div>


					<div class="form-group">
						<label>会议执行团队</label> <input type="text" class="form-control"
							name="tearm" th:value="${conference.tearm}" placeholder="用逗号隔开">
					</div>
					
					<div class="form-group">
						<label>备注1</label> <input type="text" class="form-control"
							name="remark1" th:value="${conference.remark1}">
					</div>
					
					<div class="form-group">
						<label>备注2</label> <input type="text" class="form-control"
							name="remark2" th:value="${conference.remark2}" >
					</div>


					<div style="width:240px; height: 30px; position:fixed;left:725px;bottom:10px;">
						<button type="submit" class="btn btn-primary">保存</button>
						<button type="reset" class="btn btn-primary" style="margin-left: 30px;">重置</button>
						<button type="button" class="btn btn-primary" onclick="window.history.go(-1)" style="margin-left: 30px;">返回</button>
					</div>
					
					
				</form>
			</section>
			<!-- /.content -->
		</div>
		<!-- /.content-wrapper -->

		<!-- Main Footer -->
		<div th:replace="footer::html"></div>
		<div class="control-sidebar-bg"></div>
	</div>

	<div th:replace="bottom::html"></div>
</body>

</html>